package com.ruoyi.iot.service.impl;

import java.util.List;

import cn.hutool.core.util.IdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.iot.mapper.FacDevicesRundataMapper;
import com.ruoyi.iot.domain.FacDevicesRundata;
import com.ruoyi.iot.service.IFacDevicesRundataService;

/**
 * 设备运行数据信息Service业务层处理
 * 
 * @author rww
 * @date 2024-06-24
 */
@Service
public class FacDevicesRundataServiceImpl implements IFacDevicesRundataService 
{
    @Autowired
    private FacDevicesRundataMapper facDevicesRundataMapper;

    /**
     * 查询设备运行数据信息
     * 
     * @param id 设备运行数据信息主键
     * @return 设备运行数据信息
     */
    @Override
    public FacDevicesRundata selectFacDevicesRundataById(Long id)
    {
        return facDevicesRundataMapper.selectFacDevicesRundataById(id);
    }

    /**
     * 查询设备运行数据信息列表
     * 
     * @param facDevicesRundata 设备运行数据信息
     * @return 设备运行数据信息
     */
    @Override
    public List<FacDevicesRundata> selectFacDevicesRundataList(FacDevicesRundata facDevicesRundata)
    {
        return facDevicesRundataMapper.selectFacDevicesRundataList(facDevicesRundata);
    }

    /**
     * 新增设备运行数据信息
     * 
     * @param facDevicesRundata 设备运行数据信息
     * @return 结果
     */
    @Override
    public int insertFacDevicesRundata(FacDevicesRundata facDevicesRundata)
    {
        facDevicesRundata.setId(IdUtil.getSnowflakeNextId());
        return facDevicesRundataMapper.insertFacDevicesRundata(facDevicesRundata);
    }

    /**
     * 修改设备运行数据信息
     * 
     * @param facDevicesRundata 设备运行数据信息
     * @return 结果
     */
    @Override
    public int updateFacDevicesRundata(FacDevicesRundata facDevicesRundata)
    {
        return facDevicesRundataMapper.updateFacDevicesRundata(facDevicesRundata);
    }

    /**
     * 批量删除设备运行数据信息
     * 
     * @param ids 需要删除的设备运行数据信息主键
     * @return 结果
     */
    @Override
    public int deleteFacDevicesRundataByIds(Long[] ids)
    {
        return facDevicesRundataMapper.deleteFacDevicesRundataByIds(ids);
    }

    /**
     * 删除设备运行数据信息信息
     * 
     * @param id 设备运行数据信息主键
     * @return 结果
     */
    @Override
    public int deleteFacDevicesRundataById(Long id)
    {
        return facDevicesRundataMapper.deleteFacDevicesRundataById(id);
    }
}
